package com.example.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class BookDetailController {
    @GetMapping("/detail")
    public String detail(Model model){
//        3、在BookDetailController接口控制类中使用model添加图书名称
//        4、在BookDetailController接口控制类使用model添加图书点击数
//        5、在BookDetailController接口控制类使用model添加图书阅读数
//        6、在BookDetailController接口控制类使用model添加图书字数
        model.addAttribute("name","springboot");
        model.addAttribute("number",300);
        model.addAttribute("read",102);
        model.addAttribute("total",100000);
        return "detail";
    }
}
